import {useRequest} from 'alova/client'
import {get_he_zuo_shang} from "./api/basis.js";
import React, {Component,useState} from 'react';


function App() {
    const {data,send,loading} = useRequest(get_he_zuo_shang, {
        initialData:[],
        immediate:false
    })

    return <div>
        <button onClick={send}>获取数据</button>
        <div>
            <span>{loading?'加载中':''}</span>
        </div>
        <ul>
            {data.map(item=><li key={item.id}>{item.user_name}</li>)}
        </ul>
    </div>
}

export default App;
